The ajax head template builds upon the xhtml head template by providing additional JavaScript includes for the Dojo Toolkit, which is used by the ajax a template, ajax div template , and the ajax tabbedPanel template. It is required to use this tag, <ww:head theme="ajax"/>, in your HTML <head> block if you wish to use AJAX feature. The contents of head.ftl are:

<#include "/${parameters.templateDir}/xhtml/head.ftl" />
<script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
        isDebug: ${parameters.debug?default(false)},
        bindEncoding: "${parameters.encoding}"
    };
</script>
<script language="JavaScript" type="text/javascript"
        src="<@ww.url includeParams='none' value='/webwork/dojo/dojo.js' encode='false' includeParams='none'/>"></script>
<script language="JavaScript" type="text/javascript"
        src="<@ww.url includeParams='none' value='/webwork/ajax/dojoRequire.js' encode='false' includeParams='none'/>"></script>
<script language="JavaScript" type="text/javascript"
        src="<@ww.url includeParams='none' value='/webwork/CommonFunctions.js' encode='false' includeParams='none'/>"></script>

If you are having trouble getting the AJAX theme to work, you should include the above JavaScript in your page manually, changing "isDebug: false" to "isDebug: true". This will log out debugging information directly to the screen.

Note that Dojo is configured to use the same character encoding specified in webwork.properties, typically UTF-8. For a simple example of how to use the head tag with the AJAX theme, simply do the following in your HTML:

<ww:head theme="ajax" debug="true" />